package com.tech.connect.huanzhewan;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.tech.connect.R;
import com.tech.connect.activity.BaseActivity;

public class HuanZheWanShenFenViewActivity extends BaseActivity {

    private ImageView ivReturn;
    private ImageView ivDelete;
    private int totalCount = 10;
    private int currentItem = 0;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_huanzhewan_shenfen_view);
        Intent intent = getIntent();
        getHeadBar().setTitle("互换身份");
        getHeadBar().setRightIcon(R.drawable.icon_share, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
            }
        });
        initView();
        loadData();
    }

    private void initView() {
        ShenFenView shenFenView = findViewById(R.id.shenFenView);
        ivReturn = findViewById(R.id.ivReturn);
        ivDelete = findViewById(R.id.ivDelete);
        Button btChat = findViewById(R.id.btChat);
        Button btChange = findViewById(R.id.btChange);
        ivReturn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (currentItem <= 0) {
                    showToast("前面没有了");
                    return;
                }
                currentItem--;

            }
        });
        ivDelete.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (currentItem >= totalCount - 1) {
                    showToast("没有更多了");
                    return;
                }
                currentItem++;
            }
        });
        btChat.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
        btChange.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });

    }

    private void loadData() {

    }


}